import { Get,Post,Put,Delete } from "../utils/axios";

// 查询角色信息
export const FindAllRole =  (params:object) => {
    let ret =  Get('role',params);
    return ret;
};
// 通过id查角色信息
export const GetRoleId =  (params:any) => {
    let ret =  Get('role/'+params.id);
    return ret;
};
// 通过名字查角色信息
export const GetRoleName =  (params:any) => {
    let ret =  Get('role/name/'+params.userRole);
    return ret;
};
// 添加角色信息
export const AddRole =  (params:object) => {
    let ret =  Post('role',params);
    return ret;
};
// 修改角色信息
export const UpdateRole =  (params:object) => {
    let ret =  Put('role',params);
    return ret;
};
// 删除角色信息
export const DeleteRole =  (params:any) => {
    let ret =  Delete('role/'+params.id);
    return ret;
};